package com.example.vv.model.login.base.contract;

import com.example.vv.fragmentWork.base.BaseView;
import com.example.vv.fragmentWork.entity.LoginEntity;
import com.example.vv.req.REQ_LOGIN;
import com.example.vv.res.net.BaseResponse;
import com.example.vv.res.net.API_FACTORY;

import io.reactivex.Observable;

public interface LoginContract {
    interface Model{
        default Observable<BaseResponse> login(REQ_LOGIN req_login){
            return API_FACTORY.POST_API_LOGIN(req_login);
        }
    }
    interface View extends BaseView{
        /**
         * 用户名
         * @return
         */

        String getUserName();

        /**
         * 密码
         * @return
         */
        String getPassWord();

        void getMsg(String msg);

        void setLoginEntity(LoginEntity loginEntity);
    }
    interface Presenter{
        /**
         * 登录请求
         */
        void login();

        /**
         * 判断格式是否正确
         * @return
         */
        boolean isFormat();
    }
}
